home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 14 / MacFormat n. 14 (Spain) / MacFormat 14.bin / Shareware Internet / HyperCard / XCMD Docs / CompileIt! Source Code / GetFactors(num) < prev    next >
Encoding:
Text File  |  1995-08-19  |  179 b   |  8 lines

  1. function GetFactors num
  2.   put num*1 into x
  3.   repeat with y=1 to x
  4.     if (x mod y)=0 then put y & "," after list
  5.   end repeat
  6. delete last char of list
  7.   return list
  8. end GetFactors